package com.twu.biblioteca;

public class CheckMembershipAction implements Action {
    private Library library;

    public CheckMembershipAction(Library library) {
        this.library = library;
    }

    public String execute() {
        String result;
        if(!library.isUserLoggedIn()){
            result = "Please talk to a Librarian. Thank you.";
        } else {
            result = library.getCurrentUser().toString();
        }

        return result;
    }
}
